#-*-encoding=utf-8-*-
steps = [
    FlowStep(
        name=u'init',
        title=u'申请',
        fields=[u'doc', u'description'],
        trigger=ur"""""",
        condition=u'',
        responsibles=u'[request.principal.id]',
    actions=[
        FlowStepAction(
            name=u'submit',
            title=u'提交',
            nextsteps=[u'review'],
            trigger=ur"""msg_notifier.send('文件销毁申请', 
                 '请求销毁文档！', 
                 flowsettings["reviewer"],
                 bound_obj=sheet)

"""
)
])
,

    FlowStep(
        name=u'review',
        title=u'审核',
        fields=[],
        responsibles=u'flowsettings["reviewer"]',
    actions=[
        FlowStepAction(
            name=u'accept',
            title=u'通过',
            nextsteps=[u'end'],
            trigger=ur"""msg_notifier.send('请执行文件销毁', 
                 '请按要求对文件进行销毁！', 
                 flowsettings["stuff"],
                 bound_obj=sheet)

"""
),

        FlowStepAction(
            name=u'reject',
            title=u'打回',
            nextsteps=[],
            trigger=ur"""msg_notifier.send('文件销毁申请驳回', 
                 '文件申请销毁被驳回了！', 
                 sheet['creators'],
                 bound_obj=sheet)

"""
)
])
,

    FlowStep(
        name=u'end',
        title=u'执行',
        fields=[],
        responsibles=u'flowsettings["stuff"]',
    actions=[
        FlowStepAction(
            name=u'exe',
            title=u'结束',
            nextsteps=[],
            trigger=ur"""msg_notifier.send('文件已经销毁', 
                 '文件已经销毁了！', 
                 list(sheet['creators']) + list(flowsettings["reviwer"]),
                 bound_obj=sheet)

"""
)
])
]
